import promise from 'redux-promise'
import { applyMiddleware, createStore } from 'redux'
import { logger, checker } from '../middlewares'
import reducers from '../reducers'

export default () => {
	const createStoreWithMiddleware = applyMiddleware(
		promise,
		checker
	)(createStore)

	return createStoreWithMiddleware(reducers)
}
